<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>VUE3：v-text和v-html指令</title>
  </head>
  <body>
    <div id="app"></div>

    <template id="tpl">
      <div>
        <div v-text="msg"></div>
        <div v-text="html"></div>
      </div>
      <hr />
      <div>
        <div v-html="msg"></div>
        <div v-html="html"></div>
      </div>
    </template>

    <script src="https://unpkg.com/vue@3/dist/vue.global.js"></script>
    <script>
      Vue.createApp({
        template: "#tpl",
        data() {
          return {
            msg: "Hello, 世界🌏",
            html: "<h1>Hello, 世界🌏</h1>",
          };
        },
      }).mount("#app");
    </script>
  </body>
</html>
